package pub.xspace.nova.system.service.impl;

import java.util.List;

import org.springframework.stereotype.Service;

import jakarta.annotation.Resource;
import pub.xspace.nova.system.domain.SysUser;
import pub.xspace.nova.system.mapper.SysUserMapper;
import pub.xspace.nova.system.service.SysUserService;

/**
 * 用户管理Service实现类
 * 
 * @author HeJianrong
 */
@Service
public class SysUserServiceImpl implements SysUserService {

	@Resource
	private SysUserMapper sysUserMapper;

	@Override
	public SysUser getById(String id) {
		return sysUserMapper.selectById(id);
	}

	@Override
	public SysUser getByUsername(String username) {
		return sysUserMapper.selectByUsername(username);
	}

	@Override
	public List<SysUser> getByParams(SysUser user) {
		return sysUserMapper.selectByParams(user);
	}

	@Override
	public int update(SysUser user) {
		return sysUserMapper.update(user);
	}

	@Override
	public int save(SysUser user) {
		return sysUserMapper.insert(user);
	}

	@Override
	public int deleteById(String id) {
		return sysUserMapper.deleteById(id);
	}

}
